package com.zhiche.lisa.tms.service;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.oms.dto.HuiyuncheCancleDTO;
import com.zhiche.lisa.tms.dao.model.Shipment;
import com.zhiche.lisa.tms.dao.model.bo.ShipToByLicenseBO;
import com.zhiche.lisa.tms.vo.ShipmentListInfoVo;
import com.zhiche.lisa.tms.vo.ShipmentListVo;
import com.zhiche.lisa.tms.vo.ShipmentVo;

import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 装车单 服务类
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
public interface IShipmentService extends IService<Shipment> {

    /**
     * 根据司机得到装车单概况
     */
    Page<ShipmentListVo> getShipmentListVoByDriverId(Page<Shipment> page, HttpServletRequest request);

    /**
     * 根据装车单ID得到任务明细
     */
    ShipmentVo getShipDeteailById(Long shipmentId, HttpServletRequest request);

    /**
     * 司机根据装车单ID得到任务明细
     */
    ShipmentVo getDriverShipDeteailById(Long shipmentId, HttpServletRequest request);


    /**
     * 根据车牌号运抵
     */
    void shipToByLicense(ShipToByLicenseBO shipToByLicenseBO,String token);

    /**
     * 位置上报
     */
    void positionUpload(ShipToByLicenseBO shipToByLicenseBO, String token);

    /**
     * 根据租户获取运单
     */
    Page<ShipmentListVo> getShipmentListVoByTenanId(Page<Shipment> page, HttpServletRequest request) throws ParseException;


    Boolean driverWaybill(Long driverId);


    /**
     * 司机获取装车单
     */
    Shipment getDriverShipmentnotenant(Long id);

    /**
     * 人送发车确认
     */
    void peopleSendDepartureConfirmation(HuiyuncheCancleDTO infoDTO,String token);

    /**
     * 人送运抵
     */
    void peopleSendShippingTo(HuiyuncheCancleDTO infoDTO);

    List<Shipment> selectListNotenant(EntityWrapper<Shipment> sew);

    Shipment selectOneNoTenant(EntityWrapper<Shipment> shipEW);

    /**
     * 根据运输任务code获取装车单信息
     * @param taskCode 运输任务code
     * @return Shipment
     */
    Shipment selectShipmentByShTaskCode(String taskCode);

    List<Shipment> queryShipDataWms(EntityWrapper<Shipment> stEW);

    /**
     *  查看指令列表
     * @param page
     * @return
     */
    Page<ShipmentListVo> getShipAttachlist(Page<Shipment> page);

    /**
     * 无车承运商推送省平台
     * @param shipmentId
     */
    void shipToProvince(String shipmentId,String token);

    /**
     * 根据车队ID得到装车单概况
     */
    Page<ShipmentListInfoVo> getShipmentListVoByFleetId(Page<Shipment> page, String token);

    /**
     * 导出根据车队ID得到装车单概况
     */
    List<ShipmentListInfoVo> exportShipByFleetId(Map<String, Object> page, String token);

    Boolean lspWaybill(String lspId);

    Boolean fleetWaybill(String fleetId);

    List<String> getShipSourceKeys();
}
